package com.weiadmin.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weiadmin.common.PageParam;
import com.weiadmin.model.system.PostCategoryModel;

public interface PostCategoryDao extends BaseMapper<PostCategoryModel> {

    default Page<PostCategoryModel> getList(PageParam pageParam){

        Page<PostCategoryModel> pager = new Page<>(pageParam.getPage(), pageParam.getLimit());
        QueryWrapper<PostCategoryModel> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("id");
        return selectPage(pager, queryWrapper);
    }
}
